package org.wk.upms.domain;

import org.hibernate.annotations.GenericGenerator;
import org.wk.core.db.domain.BaseEntity;

import javax.persistence.*;

/**
 * 部门类
 * @author df.wu
 */
@Entity(name="org.wk.upms.domain.DeptEntity")
@Table(name="s_security_dept")
public class DeptEntity extends BaseEntity {
    /**
     * @Fields serialVersionUID: long
     * @Desc TODO:
     */
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id", unique = true, nullable = false, length = 32)
    @GeneratedValue(generator="system-uuid")
    @GenericGenerator(name="system-uuid",strategy = "uuid")
    private String id;

    /**
     * 上级部门ID
     */
    @Column
    private String parentId;

    /**
     * 上级部门名称
     */
    @Column
    private String parentName;

    /**
     * 名称
     */
    @Column
    private String name;

    /**
     * 排序号
     */
    @Column
    private int sortNo;


    public String getId() {
        return id;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSortNo() {
        return sortNo;
    }

    public void setSortNo(int sortNo) {
        this.sortNo = sortNo;
    }
}
